package com.samphanie.auiu

import android.app.Application
import com.google.gson.Gson
import com.samphanie.auiu.library.log.AuiuConsolePrinter
import com.samphanie.auiu.library.log.AuiuLogConfig
import com.samphanie.auiu.library.log.AuiuLogManager

/**
 * @author Dries
 **/
class MApplication : Application() {

    override fun onCreate() {
        super.onCreate()

        AuiuLogManager.init(object : AuiuLogConfig() {
            override fun injectJsonParser(): JsonParser {
                return JsonParser { src -> Gson().toJson(src) }
            }

            override fun getGlobalTag(): String {
                return "MApplication"
            }

            override fun enable(): Boolean {
                return true
            }
        }, AuiuConsolePrinter())
    }
}